-- GENERATED SPELL FOR [Amani'shi Beast Tamer] --


function spell0_24059(pUnit, Event) --@Call of the Beast,n/a--
pUnit:FullCastSpellOnTarget(43359,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24059', 6342, 1)
end

function spell1_24059(pUnit, Event) --@Domesticate,n/a--
pUnit:FullCastSpellOnTarget(43361,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24059', 6251, 1)
end

function Sorts_24059(pUnit, Event)
local choix_sorts_24059 = math.random(0, 1)
if choix_sorts_24059 == 0 then
pUnit:RegisterEvent('spell0_24059', 1, 1)
end
if choix_sorts_24059 == 1 then
pUnit:RegisterEvent('spell1_24059', 1, 1)
end
end

function mob24059_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24059', math.random(1500, 3000), 1)
end

function mob24059_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24059_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24059_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24059, 1, 'mob24059_Action')
RegisterUnitEvent(24059, 2, 'mob24059_Leave')
RegisterUnitEvent(24059, 3, 'mob24059_Kill')
RegisterUnitEvent(24059, 4, 'mob24059_Die')
